using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using MvcApplication4.Models.Mapping;

namespace MvcApplication4.Models
{
    public partial class BD_Vacinas2Context : DbContext
    {
        static BD_Vacinas2Context()
        {
            Database.SetInitializer<BD_Vacinas2Context>(null);
        }

        public BD_Vacinas2Context()
            : base("Name=BD_Vacinas2Context")
        {
        }

        public DbSet<Application> Applications { get; set; }
        public DbSet<LOTE> LOTEs { get; set; }
        public DbSet<Membership> Memberships { get; set; }
        public DbSet<Profile> Profiles { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<tb_Dependente> tb_Dependente { get; set; }
        public DbSet<tb_Funcionario> tb_Funcionario { get; set; }
        public DbSet<tb_Laboratorio> tb_Laboratorio { get; set; }
        public DbSet<tb_Paciente> tb_Paciente { get; set; }
        public DbSet<tb_UBS> tb_UBS { get; set; }
        public DbSet<tb_Vacina> tb_Vacina { get; set; }
        public DbSet<tb_Vacinacao> tb_Vacinacao { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ApplicationMap());
            modelBuilder.Configurations.Add(new LOTEMap());
            modelBuilder.Configurations.Add(new MembershipMap());
            modelBuilder.Configurations.Add(new ProfileMap());
            modelBuilder.Configurations.Add(new RoleMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new tb_DependenteMap());
            modelBuilder.Configurations.Add(new tb_FuncionarioMap());
            modelBuilder.Configurations.Add(new tb_LaboratorioMap());
            modelBuilder.Configurations.Add(new tb_PacienteMap());
            modelBuilder.Configurations.Add(new tb_UBSMap());
            modelBuilder.Configurations.Add(new tb_VacinaMap());
            modelBuilder.Configurations.Add(new tb_VacinacaoMap());
            modelBuilder.Configurations.Add(new UserMap());
        }
    }
}
